package _spring_test._MessageSource;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 * @Author: huangya
 * @Date: 2021/01/18
 * @Description:
 */
public class ResourceBundleTest {

    public static void main(String[] args) {
        ResourceBundle resourceBundle1 = ResourceBundle.getBundle("_MessageSource\\resource", Locale.CHINA);
        ResourceBundle resourceBundle2 = ResourceBundle.getBundle("_MessageSource\\resource", Locale.US);
        String greetingCommon1 = resourceBundle1.getString("greeting.common");
        String greetingCommon2 = resourceBundle2.getString("greeting.common");
        System.out.println(greetingCommon1);
        System.out.println(greetingCommon2);
    }
}
